print "123"
room = 'room1'
	repeat
		local move = io.read()
		if room == 'room1' then
			if move == "south" then room = 'room3'
			elseif move == "east" then room = 'room2'
			else
				print("invalid move")
			end
		elseif room == 'room2' then
			if move == "south" then room = 'room4'
			elseif move == "west" then room = 'room1'
			else
				print("invalid move")
			end
			
		elseif room == 'room3' then
			if move == "north" then room = 'room1'
			elseif move == "east" then room = 'room4'
			else
				print("invalid move")
			end
		end
		print(room)
	until room == 'room4'
	print("Congratulations, you won"..room)
